﻿using CarAppDomain.Base;
using CarAppDto.Rule.RuleConfigDtos;
using SqlSugar;

namespace CarAppDomain.Rule.Entities
{
    /// <summary>
    /// 规则表
    /// </summary>
    [SugarTable("rule_config", TableDescription = "规则表")]
    [SugarIndex("IX_RegularExpression", "RegularExpression", OrderByType.Asc)] // 定义索引  
    public class RuleConfigEntity : BaseEntity
    {
        /// <summary>
        /// 规则名称
        /// </summary>
        [SugarColumn(ColumnDataType = "varchar", Length = 128, IsNullable = false, ColumnDescription = "规则名称")]
        public string? Name { get; set; }

        /// <summary>
        /// 规则编号
        /// </summary>
        [SugarColumn(ColumnDataType = "varchar", Length = 128, IsNullable = false, ColumnDescription = "编号")]
        public string? No { get; set; }

        /// <summary>
        /// 所属品牌代码
        /// </summary>
        [SugarColumn(ColumnDataType = "varchar", Length = 36, IsNullable = false, ColumnDescription = "所属品牌代码")]
        public string? BrandId { get; set; }

        /// <summary>
        /// 正则表达式匹配规则
        /// </summary>

        [SugarColumn(ColumnDataType = "varchar", Length = 245, IsNullable = false, ColumnDescription = "正则表达式匹配规则")]      

        public string? RegularExpression { get; set; }

        /// <summary>
        /// 规则详情
        /// </summary>
        [SugarColumn(ColumnDataType = "text",IsNullable = false, ColumnDescription = "规则详情")]
        public string? RuleConfigDetails { get; set; }

        /// <summary>
        /// 描述
        /// </summary>
        [SugarColumn(ColumnDataType = "varchar", Length = 500, IsNullable = true, ColumnDescription = "描述")]
        public string? Descption { get; set; }

    }
}
